using System;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Serialization;
using UnityEngine;

public class LevelStats
{
	
	[XmlAttribute("name")]
	public string Name{ get; set; }
	
	[XmlElement("resTime")]
	public int ResTime{ get; set; }
	
	[XmlElement("moves")]
	public int Moves{ get; set; }
	
	[XmlElement("states")]
	public int States{ get; set; }
	
	[XmlElement("usedStates")]
	public int UsedStates{ get; set; }
	
	[XmlElement("deletedStates")]
	public int DeletedStates{ get; set; }
	
	[XmlElement("usedUndo")]
	public int UsedUndo{ get; set; }
	
	[XmlElement("canceledUndo")]
	public int CanceledUndo{ get; set; }
	
	[XmlElement("hints")]
	public int Hints{ get; set; }
	
	
	public LevelStats(){
		
	}
	
	public LevelStats(string name){
		Name = name;
		ResTime = 0;
		Moves = 0;
		States = 0;
		UsedUndo = 0;
		UsedStates = 0;
		DeletedStates = 0;
		CanceledUndo = 0;
		Hints = 0;
	}
	
	public LevelStats(string name,int time, int moves, int states, int usedStates, int usedUndo, int canceledUndo, int deletedStates, int hints){
		Name = name;
		ResTime = time;
		Moves = moves;
		States = states;
		UsedUndo = usedUndo;
		UsedStates = usedStates;
		CanceledUndo = canceledUndo;
		DeletedStates = deletedStates;
		Hints = hints;
	}
	
	public override string ToString ()
	{
		return string.Format ("[LevelStats: Name={0}, Time={1}, Moves={2}, UsedUndo={3}, CanceledUndo={4}, States={5}, UsedStates={6}, DeletedStates={7}, Hints={8}]", Name, ResTime, Moves, UsedUndo, CanceledUndo, States, UsedStates, DeletedStates, Hints);
	}
	
}

